<template>
	<div>
		<a-config-provider :locale="zh_CN">
			<router-view/>
			</a-config-provider>
	</div>

</template>

<script>
	import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
	import momentop from 'moment';
	import 'moment/locale/zh-cn';
	momentop.locale('zh-cn');

	export default {
		data() {
			return {
				zh_CN,
			};
		},
		beforeMount(){
		},
		mounted(){
			this.$store.dispatch('saveUser');
			this.$store.dispatch('saveToken');
			this.$store.dispatch('saveUserName');
			/*console.log(this.$store.dispatch('savePuctior'),'我是存储图片');*/
			if (!this.$store.state.token) {
				this.$router.push({path:'/login'})
			};
			// console.log(this.$store.state.token,'token')
			// console.log(this.$store.state.username,'username')
			// console.log(this.$store.state.user,'user')
		}
	};
</script>

<style>
.clearfix:after{
content: "";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
}
	.cl{
		float: left;
	}
	.cr{
		float: right;
	}
</style>
